<?php
	require_once('MysqlConnect.php');
	//检验
	$id=$_POST['id'];
	$title=$_POST['title'];
	$author=$_POST['author'];
	$description=$_POST['description'];
	$content=$_POST['content'];
	$dateline=time();
	//插入	
		
	if(!$title) {echo "<script>alert('标题不能为空');window.location.href='Article_manage.php'</script>"; exit();}
	if(!$author) {echo "<script>alert('作者不能为空');window.location.href='Article_manage.php'</script>"; exit();}
	if(!$content) {echo "<script>alert('内容不能为空');window.location.href='Article_manage.php'</script>"; exit();}


	$update="update articlelist set title='$title',author='$author',description='$description',content='$content',dateline=$dateline where id=$id";
	if(mysql_query($update)){
		echo "<script>alert('文章修改成功');window.location.href='Article_manage.php'</script>";
	}
	else{
		echo "<script>alert('文章修改失败');window.location.href='Article_manage.php'</script>";
	}
?>